﻿<UserControl x:Class="InterLinq.Test.UI.SumByOrderPositionForm"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Themes\TabControl.xaml"/>
                <ResourceDictionary Source="Themes\TabItem.xaml"/>
                <ResourceDictionary Source="Themes\Button.xaml"/>
                <ResourceDictionary Source="Themes\GroupBox.xaml"/>
                <ResourceDictionary Source="Themes\TextBox.xaml"/>
                <ResourceDictionary Source="Themes\ScrollBar.xaml"/>
                <ResourceDictionary Source="Themes\ListView.xaml"/>
                <ResourceDictionary Source="Themes\ListBox.xaml"/>
                <ResourceDictionary Source="Themes\ComboBox.xaml"/>
                <ResourceDictionary Source="Themes\TreeView.xaml"/>
                <ResourceDictionary Source="Themes\Menu.xaml"/>
                <ResourceDictionary Source="Themes\ProgressBar.xaml"/>
                <ResourceDictionary Source="Themes\ToolTip.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Top">
        <StackPanel>
            <Label>Displays the data of a view</Label>
            <StackPanel Orientation="Horizontal" >
                <Button Name="m_submitChangesButton" Click="OnSubmitChanges">SubmitChanges</Button>
            </StackPanel>
            <StackPanel Orientation="Horizontal" >
                <Label Width="150">ProductName</Label>
                <Label Width="100">ProductName</Label>
                <Label Width="100">Price</Label>
                <Label Width="100" >Count</Label>
                <Label Width="150">TotalPrice=Price*Count</Label>
            </StackPanel>

            <ListBox Name="m_view"  Height="600" Width="700"
            HorizontalAlignment="Stretch"    VerticalAlignment="Top"
            Margin="10" 
>
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal" >
                            <Label Content="{Binding ProductName}" Width="150"></Label>
                            <TextBox Width="100" Text="{Binding ProductName}"></TextBox>
                            <Label Width="100" Content="{Binding Price}" HorizontalAlignment="Right"></Label>
                            <TextBox Width="100" Text="{Binding Count}"></TextBox>
                            <Label Width="100" Content="{Binding TotalPrice}" HorizontalAlignment="Right"></Label>

                        </StackPanel>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>

        </StackPanel>
    </StackPanel>
</UserControl>
